public class ExampleViewComponent : ViewComponent {
public Task<IViewComponentResult> InvokeAsync() {
ExampleModel model = new ExampleModel(2);
// returns a finished task
return Task.FromResult<IViewComponentResult>(View(model));
}
}